//
//  UIButton+Extension.swift
//  swift-weibo
//
//  Created by 陈乾 on 15/11/1.
//  Copyright © 2015年 陈乾. All rights reserved.
//

import UIKit

extension UIButton {

    convenience init(title: String, imageName: String, titleColor: UIColor,fontSize: CGFloat) {
      //调用自己的
        self.init()
        //设置文字
        self.setTitle(title, forState: UIControlState.Normal)
        //设置图片
        self.setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        //设置文字颜色
        self.setTitleColor(titleColor, forState: UIControlState.Normal)
        //设置文字大小
        self.titleLabel?.font = UIFont.systemFontOfSize(fontSize)
        
    
    }

}
